package forces;

import java.awt.Dimension;

import util.Location;
import util.Vector;

/**
 * defines wall as an extension of Force.
 * abstract class to extend to specific walls
 * @author Schwartz & Roy
 *
 */
public abstract class WallForce extends Force {

    private double myMagnitude;
    private double myExponent;

    /**
     * constructor sets default values.
     */
    public WallForce() {
        this(DEFAULT_MAGNITUDE, DEFAULT_EXPONENT);
    }

    /**
     * constructor sets default values.
     * @param mag is the magnitude of the force
     * @param exp is the exponent of the force
     */
    public WallForce(double mag, double exp) {
        super();
        myMagnitude = mag;
        myExponent = exp;
    }

    /**
     * @return the magnitude of this force
     */
    public double getMagnitude() {
        return myMagnitude;
    }

    /**
     * @return the exponent of this force
     */
    public double getExponent() {
        return myExponent;
    }

    /**
     * abstract method for specific walls to implement.
     * @param massLocation is the location of the given mass
     * @param bounds of the simulation
     */
    @Override
    public abstract Vector getForceVector(Location massLocation, Dimension bounds);

}
